using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace ShopForWeb.Models.Basic
{
  /// <summary>
      /// Product
      /// </summary>
  [Table("T_Product")]
  public partial class Product
  {
    /// <summary>
            /// 简介
            /// </summary>
    [StringLength(200)]
    public string Description { get; set; } = "";

    /// <summary>
            /// 图片
            /// </summary>
    [StringLength(50)]
    public string Photo { get; set; } = "";

    /// <summary>
            /// 价格
            /// </summary>
    [Column(TypeName = "decimal(18,2)")]
    public decimal Price { get; set; }

    /// <summary>
            /// 商品ID，主键，自增
            /// </summary>
    [Key]
    [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
    public long ProductId { get; set; }

    /// <summary>
            /// 商品名称
            /// </summary>
    [StringLength(50)]
    public string ProductName { get; set; } = "";

    /// <summary>
            /// 单位
            /// </summary>
    [StringLength(10)]
    public string Unit { get; set; } = "";
  }
}
